home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / ncsat.cpt / Telnet2.5 final / tek / rgmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-27  |  2.3 KB  |  172 lines

  1. #ifdef lint
  2. static char *SCCSid = "%W%    (NCSA)    %G%";
  3. #endif
  4.  
  5. /*
  6.  
  7. rgmp.c by Gaige B. Paulsen
  8.   spawned from rgp.c by Aaron Contorer for NCSA
  9. Copyright 1987, board of trustees, University of Illinois
  10.  
  11. Routines for Macintosh Picture output.  Only one Real device is available
  12.  
  13. */
  14.  
  15. /* 
  16.  *    Include files 
  17.  */
  18.  
  19. #include <stdio.h>
  20.  
  21. #include <Controls.h>
  22. #include <OSutils.h>
  23. #include <Packages.h>
  24. #include <Quickdraw.h>
  25. #include <Windows.h>
  26.  
  27.  
  28. #define TRUE 1
  29. #define FALSE 0
  30. #define MAXWIND 20
  31. #define INXMAX 4096
  32. #define INYMAX 4096
  33.  
  34. char *MPname = "Macintosh PICTURE output";
  35. char RGMPbusy; /* is device already in use */
  36. int RGMPwidth, RGMPheight, RGMPxoffset=0, RGMPyoffset=0;
  37. int RGMPcolor[]=
  38.     { 30,            /* black */
  39.       33,            /* white */
  40.       205,            /* red */
  41.       341,            /* green */
  42.       409,            /* blue */
  43.       273,            /* cyan */
  44.       137,            /* magenta */
  45.       69            /* yellow */
  46.       };
  47.  
  48. RGMPcharmode(w,rotation,size)
  49.   {
  50. #pragma unused(w, rotation, size)
  51.   }
  52.  
  53. RGMPpagedone()
  54.   {
  55.   }
  56.  
  57. RGMPpencolor(w, color)
  58. {
  59. #pragma unused(w)
  60.     ForeColor( (long) RGMPcolor[color] );
  61. }
  62.  
  63. RGMPdataline()
  64.   {
  65.   }
  66.  
  67. RGMPclrscr()
  68.   {
  69.   }
  70.  
  71. RGMPshowcur()
  72.   {
  73.   }
  74.  
  75. RGMPlockcur()
  76.   {
  77.   }
  78.  
  79. RGMPhidecur()
  80.   {
  81.   }
  82.  
  83. RGMPbell(w)
  84.   {
  85. #pragma unused(w)
  86.   }
  87.  
  88. RGMPuncover(w)
  89.   {
  90. #pragma unused(w)
  91.   }
  92.  
  93. RGMPinfo(w,v,a,b,c,d)
  94. int w,a,b,c,d,v;
  95.   {
  96. #pragma unused(w, v, a, b, c, d)
  97.   }
  98.  
  99. RGMPgmode()
  100.   {
  101.   }
  102.  
  103. RGMPtmode()
  104.   {
  105.   }
  106.  
  107. char *RGMPdevname() {
  108.     return(MPname);
  109. }
  110.  
  111. RGMPinit()
  112. {
  113.     RGMPbusy=0;
  114.  
  115. /*    RGMPwidth=4096;
  116.     RGMPheight=4096; */
  117.     RGMPxoffset=0;
  118.     RGMPyoffset=0;
  119. }
  120.  
  121. RGMPnewwin()
  122. {
  123.  
  124.     RGMPbusy=1;
  125.  
  126. /*    RGMPwidth=4096;
  127.     RGMPheight=4096;     */
  128.     RGMPxoffset=0;
  129.     RGMPyoffset=0;
  130.  
  131.     return(0);
  132. }
  133.  
  134. RGMPclose(w)
  135.   {
  136. #pragma unused(w)
  137.     RGMPbusy=0;
  138.   }
  139.  
  140. RGMPpoint(w,x,y)
  141.   {
  142. #pragma unused(w)
  143.     MoveTo(x,y);
  144.     LineTo(x,y);
  145. }
  146.  
  147. RGMPdrawline(w,x0,y0,x1,y1)
  148. int w,x0,y0,x1,y1;
  149.   {
  150. #pragma unused(w)
  151.     x0 = RGMPxoffset + (int) ((long) x0 * RGMPwidth / INXMAX);
  152.     y0 = RGMPyoffset + RGMPheight - (int) ((long) y0 * RGMPheight / INYMAX);
  153.     x1 = RGMPxoffset + (int) ((long) x1 * RGMPwidth/INXMAX);
  154.     y1 = RGMPyoffset + RGMPheight - (int) ((long) y1 * RGMPheight / INYMAX);
  155.  
  156.     MoveTo(x0,y0);
  157.     LineTo(x1,y1);
  158.   }
  159.  
  160. int RGMPsize
  161.   (
  162.     Rect *incoming
  163.   )
  164. {
  165.     RGMPheight= incoming->bottom-incoming->top;
  166.     RGMPwidth = incoming->right - incoming->left;
  167.     RGMPyoffset= incoming->top;
  168.     RGMPxoffset= incoming->left; 
  169.  
  170.     return(0);
  171. }
  172.